@echo off
SETLOCAL

echo Setting GOOS to Linux and GOARCH to amd64
set GOOS=linux
set GOARCH=amd64

echo Compiling main.go to ./main
go build -o main main.go

if %ERRORLEVEL% neq 0 (
    echo Compilation failed with errors.
    exit /b %ERRORLEVEL%
)

echo Compilation successful. Executable created: main
ENDLOCAL
